<%-- 
    Document   : checkoutAddress
    Created on : 2 Jul, 2012, 2:10:13 AM
    Author     : Windows
--%>
<%@include file="/jsp/top.jsp"%>

<html>
    <head>

        <title>CheckOut Address</title>
    </head>
    <body>
        <div class="clear"></div>
        <table cellspacing="5px" width="100%" align="center">
            <tr>
                <td>
                    <table cellspacing="5px" width="100%" align="center">
                        <tr>                                                         
                            <td style="vertical-align: top;">
                                <table align="center" border="1" cellspacing="10px" width="100%">
                                    <tr>
                                        <td colspan="2" style="vertical-align: top;" align="center">
                                            <a href="#">
                                                <img alt="" src="images/1green.png"/>User Information
                                            </a>
                                            <img alt="" src="images/pb_arrow.gif"/>
                                            <img alt="" src="images/2black.png"/>Address
                                            <img alt="" src="images/pb_arrow.gif"/>
                                            <a href="./checkout.do?action=checkoutUserAddress&userId=<%=session.getAttribute("loginUserId")%>">
                                                <img alt="" src="images/3green.png"/>Payment & Delivery
                                            </a>
                                            <img alt="" src="images/pb_arrow.gif"/>
                                            <img alt="" src="images/4grey.png"/> Place Order
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <div class="page-title"><h1>2. Address</h1></div>
                                        </td>
                                    </tr>
                                    <html:form action="/checkout" method="post">
                                        <tr>
                                            <td><strong>Billing Address</strong></td>
                                            <td><strong>Delivery Address</strong>
                                                <%--<html:checkbox property="sameBillingAddr" onchange="javascript:togglediv('deliveryaddr');" value="off"/> Use My Billing Address--%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="50%">
                                                <div>
                                                    <logic:present name="userAddrBilling" scope="request">
                                                        <table cellspacing="5px" align="center" width="100%">
                                                            <tr>
                                                                <td>
                                                                    Title: <br/>
                                                                    <strong><bean:write name="userAddrBilling" property="addrTitle"/></strong>
                                                                </td>
                                                                <td>
                                                                    First Name:<br/>
                                                                    <strong><bean:write name="userAddrBilling" property="addrFirstName" /></strong>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>Middle Name:<br/>
                                                                    <strong> <bean:write name="userAddrBilling" property="addrMiddleName" /></strong></td>
                                                                <td>Last Name:<br/>
                                                                    <strong> <bean:write name="userAddrBilling" property="addrLastName" /></strong></td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="2">Address :<br/>
                                                                    <strong> <bean:write name="userAddrBilling" property="house" /></strong></td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="2">Address, line2:<br/>
                                                                    <strong> <bean:write name="userAddrBilling" property="street" /> </strong></td>
                                                            </tr>
                                                            <tr>
                                                                <td>City:<br/>
                                                                    <strong>  <bean:write name="userAddrBilling" property="city" /></strong></td>
                                                                <td>State:<br/>
                                                                    <strong>  <bean:write name="userAddrBilling" property="state" /></strong></td>
                                                            </tr>
                                                            <tr>
                                                                <td>Pin Code:<br/>
                                                                    <strong> <bean:write name="userAddrBilling" property="pinCode" /></strong></td>
                                                                <td>Mobile No:<br/>
                                                                    <strong> <bean:write name="userAddrBilling" property="contact" /></strong></td>
                                                            </tr>
                                                        </table>
                                                    </logic:present>
                                                </div>
                                            </td>

                                            <td width="50%">
                                                <div id="deliveryaddr" style="display: block;">
                                                    <logic:present name="userAddrDelivery" scope="request">
                                                        <table cellspacing="5px" align="center" width="100%">
                                                            <tr>
                                                                <td>
                                                                    <div id="errdividcoda" >
                                                                        <span id="errspanidcoda"></span>
                                                                        <html:errors property="errCheckoutDelAddr"/>
                                                                    </div>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Title:<br/>
                                                                    <html:select name="userAddrDelivery" property="addrTitleId" style="width:200px" >
                                                                        <html:option value="0">--- Select ---</html:option>
                                                                        <html:options collection="titleMap" property="key" labelProperty="value"/>
                                                                    </html:select>
                                                                </td>
                                                                <td>
                                                                    First Name:<br/>
                                                                    <html:text name="userAddrDelivery" property="addrFirstName" style="width:200px" onblur="this.value=removeSpaces(this.value);"/>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>Middle Name:<br/>
                                                                    <html:text name="userAddrDelivery" property="addrMiddleName" style="width:200px" onblur="this.value=removeSpaces(this.value);"/></td>
                                                                <td>Last Name:<br/>
                                                                    <html:text name="userAddrDelivery" property="addrLastName" style="width:200px" onblur="this.value=removeSpaces(this.value);"/></td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="2">Address :<br/>
                                                                    <html:text name="userAddrDelivery" property="house" style="width:400px" onblur="this.value=removeSpaces(this.value);"/></td>
                                                            </tr>
                                                            <tr>
                                                                <td colspan="2">Address, line2:<br/>
                                                                    <html:text name="userAddrDelivery" property="street" style="width:400px" onblur="this.value=removeSpaces(this.value);"/> </td>
                                                            </tr>
                                                            <tr>
                                                                <td>City:<br/>
                                                                    <html:text name="userAddrDelivery" property="city" style="width:200px" onblur="this.value=removeSpaces(this.value);"/></td>
                                                                <td>State:<br/>
                                                                    <html:select name="userAddrDelivery" property="stateId" style="width:200px">
                                                                        <html:option value="0">--- Select ---</html:option>
                                                                        <html:options collection="stateMap" property="key" labelProperty="value"/>
                                                                    </html:select></td>
                                                            </tr>
                                                            <tr>
                                                                <td>Pin Code:<br/>
                                                                    <html:text name="userAddrDelivery" property="pinCode" style="width:200px" onblur="this.value=removeSpaces(this.value);"/></td>
                                                                <td>Mobile No:<br/>
                                                                    <html:text name="userAddrDelivery" property="contact" style="width:200px" onblur="this.value=removeSpaces(this.value);"/></td>
                                                            </tr>
                                                        </table>
                                                    </logic:present>
                                                </div>
                                            </td>

                                        </tr>
                                        <tr>
                                            <td colspan="2"><hr/></td>
                                        </tr>
                                        <tr>
                                            <td align="right" colspan="2">
                                                <a onclick="javascript:return validateCheckoutAddr('./checkout.do?action=checkoutUserAddress&userId=<%=session.getAttribute("loginUserId")%>','userBean')">
                                                    <img alt="Continue" src="images/continue.png" onmouseout="src='images/continue.png'" onmouseover="src='images/continue.png'"/></a>
                                            </td>
                                        </tr>
                                    </html:form>
                                    <tr>
                                        <td align="center" colspan="2" >
                                            <strong> PLEASE NOTE:</strong> If you intend to pay using Cash on Delivery then you must set the billing and the shipping address to be the same.
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td><%@include file="/jsp/footer.jsp" %></td>
            </tr>
        </table>
    </body>
</html>
